{ //=========Macro generated from canvas: d0 all fits/ //========= (Sat Mar 14 14:59:35 2009) by ROOT version5.22/00 TCanvas *d0 all fits = new TCanvas("d0 all fits", "",0,0,600,600); gStyle->SetOptFit(1); d0 all fits->SetHighLightColor(2); d0 all fits->Range(0,0,1,1); d0 all fits->SetFillColor(10); d0 all fits->SetBorderMode(0); d0 all fits->SetBorderSize(2); d0 all fits->SetLogx(); d0 all fits->SetLogy(); d0 all fits->SetTickx(1); d0 all fits->SetTicky(1); d0 all fits->SetLeftMargin(0.19); d0 all fits->SetRightMargin(0.06); d0 all fits->SetTopMargin(0.08); d0 all fits->SetBottomMargin(0.18); d0 all fits->SetFrameLineWidth(2); d0 all fits->SetFrameBorderMode(0); TH1 *hpx = new TH2F("hpx","",10,0.65,74,10,0.001,10); hpx->SetStats(0); hpx->SetLineWidth(2); hpx->SetMarkerStyle(20); hpx->SetMarkerSize(1.3); hpx->GetXaxis()->SetTitle("Momentum/GeV"); hpx->GetXaxis()->SetNdivisions(506); hpx->GetXaxis()->SetLabelFont(42); hpx->GetXaxis()->SetLabelOffset(0.015); hpx->GetXaxis()->SetTitleSize(0.07); hpx->GetXaxis()->SetTitleFont(42); hpx->GetYaxis()->SetTitle("#sigma_{r#phi}/mm"); hpx->GetYaxis()->SetNdivisions(506); hpx->GetYaxis()->SetLabelFont(42); hpx->GetYaxis()->SetLabelOffset(0.015); hpx->GetYaxis()->SetTitleSize(0.07); hpx->GetYaxis()->SetTitleOffset(1.1); hpx->GetYaxis()->SetTitleFont(42); hpx->GetZaxis()->SetLabelFont(42); hpx->GetZaxis()->SetLabelOffset(0.015); hpx->GetZaxis()->SetTitleSize(0.07); hpx->GetZaxis()->SetTitleOffset(1.1); hpx->GetZaxis()->SetTitleFont(42); hpx->Draw(""); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle(""); TGraphErrors *gre = new TGraphErrors(10); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetLineWidth(2); gre->SetMarkerStyle(22); gre->SetMarkerSize(1.3); gre->SetPoint(0,1,4.443452); gre->SetPointError(0,0,0.05760185); gre->SetPoint(1,3,1.415219); gre->SetPointError(1,0,0.01212924); gre->SetPoint(2,6,0.6896548); gre->SetPointError(2,0,0.005696123); gre->SetPoint(3,10,0.4177102); gre->SetPointError(3,0,0.003452049); gre->SetPoint(4,17,0.2446818); gre->SetPointError(4,0,0.0019831); gre->SetPoint(5,25,0.1694977); gre->SetPointError(5,0,0.001427515); gre->SetPoint(6,50,0.0869415); gre->SetPointError(6,0,0.000715788); gre->SetPoint(7,75,0.06073982); gre->SetPointError(7,0,0.0005081776); gre->SetPoint(8,100,0.04790701); gre->SetPointError(8,0,0.0003947178); gre->SetPoint(9,200,0.03138711); gre->SetPointError(9,0,0.0002559197); TH1 *Graph5 = new TH1F("Graph5","Graph",100,0.9,219.9); Graph5->SetMinimum(0.02801807); Graph5->SetMaximum(4.948047); Graph5->SetDirectory(0); Graph5->SetStats(0); Graph5->SetLineWidth(2); Graph5->SetMarkerStyle(20); Graph5->SetMarkerSize(1.3); Graph5->GetXaxis()->SetNdivisions(506); Graph5->GetXaxis()->SetLabelFont(42); Graph5->GetXaxis()->SetLabelOffset(0.015); Graph5->GetXaxis()->SetTitleSize(0.07); Graph5->GetXaxis()->SetTitleFont(42); Graph5->GetYaxis()->SetNdivisions(506); Graph5->GetYaxis()->SetLabelFont(42); Graph5->GetYaxis()->SetLabelOffset(0.015); Graph5->GetYaxis()->SetTitleSize(0.07); Graph5->GetYaxis()->SetTitleOffset(1.1); Graph5->GetYaxis()->SetTitleFont(42); Graph5->GetZaxis()->SetLabelFont(42); Graph5->GetZaxis()->SetLabelOffset(0.015); Graph5->GetZaxis()->SetTitleSize(0.07); Graph5->GetZaxis()->SetTitleOffset(1.1); Graph5->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph5); multigraph->Add(gre,"pX"); gre = new TGraphErrors(10); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetLineColor(2); gre->SetLineWidth(2); gre->SetMarkerColor(2); gre->SetMarkerStyle(23); gre->SetMarkerSize(1.3); gre->SetPoint(0,1,0.05002236); gre->SetPointError(0,0,0.0004359634); gre->SetPoint(1,3,0.01755455); gre->SetPointError(1,0,0.0001471918); gre->SetPoint(2,6,0.009217812); gre->SetPointError(2,0,7.843528e-05); gre->SetPoint(3,10,0.00611317); gre->SetPointError(3,0,5.183277e-05); gre->SetPoint(4,17,0.004258886); gre->SetPointError(4,0,3.567237e-05); gre->SetPoint(5,25,0.003387764); gre->SetPointError(5,0,3.093011e-05); gre->SetPoint(6,50,0.002704593); gre->SetPointError(6,0,2.558682e-05); gre->SetPoint(7,75,0.002503201); gre->SetPointError(7,0,2.439582e-05); gre->SetPoint(8,100,0.002458967); gre->SetPointError(8,0,2.476775e-05); gre->SetPoint(9,200,0.002474805); gre->SetPointError(9,0,2.611194e-05); TH1 *Graph6 = new TH1F("Graph6","Graph",100,0.9,219.9); Graph6->SetMinimum(0.00219078); Graph6->SetMaximum(0.05526073); Graph6->SetDirectory(0); Graph6->SetStats(0); Graph6->SetLineWidth(2); Graph6->SetMarkerStyle(20); Graph6->SetMarkerSize(1.3); Graph6->GetXaxis()->SetNdivisions(506); Graph6->GetXaxis()->SetLabelFont(42); Graph6->GetXaxis()->SetLabelOffset(0.015); Graph6->GetXaxis()->SetTitleSize(0.07); Graph6->GetXaxis()->SetTitleFont(42); Graph6->GetYaxis()->SetNdivisions(506); Graph6->GetYaxis()->SetLabelFont(42); Graph6->GetYaxis()->SetLabelOffset(0.015); Graph6->GetYaxis()->SetTitleSize(0.07); Graph6->GetYaxis()->SetTitleOffset(1.1); Graph6->GetYaxis()->SetTitleFont(42); Graph6->GetZaxis()->SetLabelFont(42); Graph6->GetZaxis()->SetLabelOffset(0.015); Graph6->GetZaxis()->SetTitleSize(0.07); Graph6->GetZaxis()->SetTitleOffset(1.1); Graph6->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph6); multigraph->Add(gre,"pX"); gre = new TGraphErrors(10); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetLineColor(8); gre->SetLineWidth(2); gre->SetMarkerColor(8); gre->SetMarkerStyle(20); gre->SetMarkerSize(1.3); gre->SetPoint(0,1,0.02331246); gre->SetPointError(0,0,0.0001617966); gre->SetPoint(1,3,0.008427031); gre->SetPointError(1,0,5.685561e-05); gre->SetPoint(2,6,0.004857382); gre->SetPointError(2,0,3.078823e-05); gre->SetPoint(3,10,0.003430255); gre->SetPointError(3,0,2.171427e-05); gre->SetPoint(4,17,0.002620151); gre->SetPointError(4,0,1.712497e-05); gre->SetPoint(5,25,0.002287869); gre->SetPointError(5,0,1.569385e-05); gre->SetPoint(6,50,0.001945084); gre->SetPointError(6,0,1.466419e-05); gre->SetPoint(7,75,0.001903828); gre->SetPointError(7,0,1.471997e-05); gre->SetPoint(8,100,0.001861811); gre->SetPointError(8,0,1.473065e-05); gre->SetPoint(9,200,0.001880777); gre->SetPointError(9,0,1.477811e-05); TH1 *Graph7 = new TH1F("Graph7","Graph",100,0.9,219.9); Graph7->SetMinimum(0.001662372); Graph7->SetMaximum(0.02563697); Graph7->SetDirectory(0); Graph7->SetStats(0); Graph7->SetLineWidth(2); Graph7->SetMarkerStyle(20); Graph7->SetMarkerSize(1.3); Graph7->GetXaxis()->SetNdivisions(506); Graph7->GetXaxis()->SetLabelFont(42); Graph7->GetXaxis()->SetLabelOffset(0.015); Graph7->GetXaxis()->SetTitleSize(0.07); Graph7->GetXaxis()->SetTitleFont(42); Graph7->GetYaxis()->SetNdivisions(506); Graph7->GetYaxis()->SetLabelFont(42); Graph7->GetYaxis()->SetLabelOffset(0.015); Graph7->GetYaxis()->SetTitleSize(0.07); Graph7->GetYaxis()->SetTitleOffset(1.1); Graph7->GetYaxis()->SetTitleFont(42); Graph7->GetZaxis()->SetLabelFont(42); Graph7->GetZaxis()->SetLabelOffset(0.015); Graph7->GetZaxis()->SetTitleSize(0.07); Graph7->GetZaxis()->SetTitleOffset(1.1); Graph7->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph7); multigraph->Add(gre,"pX"); gre = new TGraphErrors(10); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); gre->SetLineColor(4); gre->SetLineWidth(2); gre->SetMarkerColor(4); gre->SetMarkerStyle(21); gre->SetMarkerSize(1.3); gre->SetPoint(0,1,0.01083781); gre->SetPointError(0,0,9.122284e-05); gre->SetPoint(1,3,0.004347574); gre->SetPointError(1,0,3.78796e-05); gre->SetPoint(2,6,0.002880317); gre->SetPointError(2,0,2.566027e-05); gre->SetPoint(3,10,0.0022853); gre->SetPointError(3,0,2.16989e-05); gre->SetPoint(4,17,0.002076519); gre->SetPointError(4,0,2.140529e-05); gre->SetPoint(5,25,0.001969377); gre->SetPointError(5,0,2.127932e-05); gre->SetPoint(6,50,0.001845453); gre->SetPointError(6,0,2.092187e-05); gre->SetPoint(7,75,0.001865289); gre->SetPointError(7,0,2.123708e-05); gre->SetPoint(8,100,0.001859595); gre->SetPointError(8,0,2.023966e-05); gre->SetPoint(9,200,0.001810414); gre->SetPointError(9,0,2.03281e-05); TH1 *Graph8 = new TH1F("Graph8","Graph",100,0.9,219.9); Graph8->SetMinimum(0.0008761912); Graph8->SetMaximum(0.01184292); Graph8->SetDirectory(0); Graph8->SetStats(0); Graph8->SetLineWidth(2); Graph8->SetMarkerStyle(20); Graph8->SetMarkerSize(1.3); Graph8->GetXaxis()->SetNdivisions(506); Graph8->GetXaxis()->SetLabelFont(42); Graph8->GetXaxis()->SetLabelOffset(0.015); Graph8->GetXaxis()->SetTitleSize(0.07); Graph8->GetXaxis()->SetTitleFont(42); Graph8->GetYaxis()->SetNdivisions(506); Graph8->GetYaxis()->SetLabelFont(42); Graph8->GetYaxis()->SetLabelOffset(0.015); Graph8->GetYaxis()->SetTitleSize(0.07); Graph8->GetYaxis()->SetTitleOffset(1.1); Graph8->GetYaxis()->SetTitleFont(42); Graph8->GetZaxis()->SetLabelFont(42); Graph8->GetZaxis()->SetLabelOffset(0.015); Graph8->GetZaxis()->SetTitleSize(0.07); Graph8->GetZaxis()->SetTitleOffset(1.1); Graph8->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph8); multigraph->Add(gre,"pX"); multigraph->Draw("LP"); TLegend *leg = new TLegend(0.67,0.65,0.92,0.9,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); leg->SetTextSize(0.05); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("Graph","#theta = 7^{#circ}","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(22); entry->SetMarkerSize(1.3); entry=leg->AddEntry("Graph","#theta = 20^{#circ}","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(2); entry->SetMarkerStyle(23); entry->SetMarkerSize(1.3); entry=leg->AddEntry("Graph","#theta = 30^{#circ}","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(8); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.3); entry=leg->AddEntry("Graph","#theta = 85^{#circ}","p"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(4); entry->SetMarkerStyle(21); entry->SetMarkerSize(1.3); leg->Draw(); TF1 *f2 = new TF1("f2","sqrt( ([0]*[0]) + ( ([1]/(0.20*x)) * ([1]/(0.20*x)) ) )",0.5,150); f2->SetFillColor(10); f2->SetFillStyle(0); f2->SetMarkerStyle(20); f2->SetMarkerSize(0.7); f2->SetLineColor(2); f2->SetLineWidth(2); f2->GetXaxis()->SetNdivisions(506); f2->GetXaxis()->SetLabelFont(42); f2->GetXaxis()->SetLabelOffset(0.015); f2->GetXaxis()->SetTitleSize(0.07); f2->GetXaxis()->SetTitleFont(42); f2->GetYaxis()->SetNdivisions(506); f2->GetYaxis()->SetLabelFont(42); f2->GetYaxis()->SetLabelOffset(0.015); f2->GetYaxis()->SetTitleSize(0.07); f2->GetYaxis()->SetTitleOffset(1.1); f2->GetYaxis()->SetTitleFont(42); f2->SetParameter(0,0.005); f2->SetParError(0,0); f2->SetParLimits(0,0,0); f2->SetParameter(1,0.01); f2->SetParError(1,0); f2->SetParLimits(1,0,0); f2->Draw("CSAME"); TF1 *f3 = new TF1("f3","sqrt( ([0]*[0]) + ( ([1]/(0.994297*x)) * ([1]/(0.994297*x)) ) )",0.5,150); f3->SetFillColor(10); f3->SetFillStyle(0); f3->SetMarkerStyle(20); f3->SetMarkerSize(0.7); f3->SetLineColor(4); f3->SetLineWidth(2); f3->GetXaxis()->SetNdivisions(506); f3->GetXaxis()->SetLabelFont(42); f3->GetXaxis()->SetLabelOffset(0.015); f3->GetXaxis()->SetTitleSize(0.07); f3->GetXaxis()->SetTitleFont(42); f3->GetYaxis()->SetNdivisions(506); f3->GetYaxis()->SetLabelFont(42); f3->GetYaxis()->SetLabelOffset(0.015); f3->GetYaxis()->SetTitleSize(0.07); f3->GetYaxis()->SetTitleOffset(1.1); f3->GetYaxis()->SetTitleFont(42); f3->SetParameter(0,0.005); f3->SetParError(0,0); f3->SetParLimits(0,0,0); f3->SetParameter(1,0.01); f3->SetParError(1,0); f3->SetParLimits(1,0,0); f3->Draw("CSAME"); d0 all fits->Modified(); d0 all fits->cd(); d0 all fits->SetSelected(d0 all fits); d0 all fits->SaveAs("d0_all_fits.eps"); d0 all fits->SaveAs("d0_all_fits.gif"); }